<template>
  <!--中间内容开始-->
  <div class="one-content">
    <!--导航栏下的轮播图片-->

    <slides-show :slides="slides" :inv="slideSpeed"></slides-show>

    <!--轮播图片下的热卖产品的介绍开始-->
    <div class="one-board-title">
    <!--<h1>HOT!!!热卖商品</h1>-->
    <img src="../assets/img/hotsale.png" alt="" class="hotsale">
  </div>
    <div class="one-board-list">
      <!--<div class="one-board-item" v-for="item in boardList">-->
      <div class="one-board-box">
      <div class="one-board-item" v-for="(item,index) in boardList"
           :class="[{'line-last': index % 2 !== 0},'one-board-' + item.id]">
        <div class="one-board-item-inner">
          <h2>{{ item.title }}</h2>
          <p> {{ item.description }}</p>
          <div class="one-board-button">
            <a :href="item.url" class="button">查看宝贝</a>
          </div>
        </div>
      </div>
      </div>
    </div>
    <!--轮播图片下的热卖产品的介绍结束-->

  </div>
  <!--中间内容结束-->
</template>

<script>
  import slidesShow from './slidesShow.vue'
export default {
  components:{
    slidesShow
  },
  name:'content',
  data() {
    return {
      slides:[
        {
          src:require('../assets/img/longapple.jpg'),
          title:"苹果一号",
          href:'detail/analysis'
        },
        {
          src:require('../assets/img/fullfruit.jpg'),
          title:"苹果二号",
          href:'detail/analysis'
        },
        {
          src:require('../assets/img/grape.jpg'),
          title:"苹果三号",
          href:'detail/analysis'
        },
        {
          src:require('../assets/img/shiliu.jpg'),
          title:"苹果四号",
          href:'detail/analysis'
        }
      ],
      boardList:[
        {
          title:'红富士苹果',
          description:'这是国产山东的好苹果！',
          id:'apple',
          saleout:false,
          url:'/#/detail/apple'
        },
        {
          title:'雪梨',
          description:'这是国产山东的好苹果！',
          id:'pear',
          saleout:false,
          url:'/#/detail/apple'
        },
        {
          title:'桃子',
          description:'这是国产山东的好苹果！',
          id:'peach',
          saleout:false,
          url:'/#/detail/apple'
        },
        {
          title:'奇异果',
          description:'这是国产山东的好苹果！',
          id:'kiwi',
          saleout:false,
          url:'/#/detail/apple'
        }
      ]
    }
  }
}
</script>
